package monster.flight.admin.action.xtgl.role;

import java.util.HashMap;
import java.util.List;

import monster.comm.action.BaseJsonListAction;
import monster.comm.log.ILog;
import monster.comm.log.LogService;
import monster.comm.util.ReturnConstant;
import monster.comm.util.SpringApplicationContextFactory;
import monster.comm.util.SysConstant;
import monster.flight.admin.manager.imp.xtgl.RoleServiceImp;
import monster.flight.admin.manager.service.xtgl.DictService;
import monster.flight.admin.manager.service.xtgl.RoleService;
import monster.flight.comm.entity.vo.Xt_role;

/**
 * 
* 创建信息=============
* 类名: monster.flight.admin.action.xtgl.role.RoleListAction
* 类作用描述: 后台系统管理角色管理角色查询分页
* 创建人： fyr
* 创建时间： 2013-1-18 上午11:25:17
* 修改信息1=============
* 修改类型:     //1.修改bug 2.业务变化修改
* 修改描述: 
* 修改人：  
* 修改时间：
 */
public class RoleListAction extends BaseJsonListAction<RoleService, Xt_role> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 232081467116905972L;
	private static ILog log = LogService.getLog(RoleListAction.class);
	public List<Xt_role> list;
	private String ret;
	private RoleService roleService;
	public void setRoleService(RoleService roleService) {
		this.roleService = roleService;
	}
	/**
	 * 角色分页方法
	 * @return
	 */
	public String roleList() {
		try {
			String islogin = this.isLogin();
			 if(islogin.equals("1")){
				 Xt_role xt_role = new Xt_role();
				 HashMap<String, Object> map = new HashMap<String, Object>();
		         map.put("condition", xt_role);	   
		         map.put("order", "order by xt desc");
				 list =  doPage(roleService,xt_role,map);
				 returnVO.returnCode = ReturnConstant.IS_DEAL_OK;
			 }else{
				 ret = ReturnConstant.IS_NOT_LOGIN;
			 }
		} catch (Exception e) {
			ret = ReturnConstant.IS_PARAMS_ERR;
			log.error(e.getMessage(), e);
		}
		return "list";
	}
	public List<Xt_role> getList() {
		return list;
	}


	public void setList(List<Xt_role> list) {
		this.list = list;
	}

	public String getRet() {
		return ret;
	}


	public void setRet(String ret) {
		this.ret = ret;
	}
	
}
